package com.tmxk.days01.szk;

public class Scenic {
    String name;
    int age;

    public void Price(){
        if (age >= 0 && age <=100) {
            if(age == 5){
                System.out.println(name +"的年龄为:" + age + ",门票免费");
            }else{
                System.out.println(name +"的年龄为:" + age + "门票的价格为20元 ");
            }
        }else{
            System.out.println("您的输入有误");
        }
    }
}
